package edu.uow.devdocs
/**
 * The Property entity.
 *
 * @author    
 *
 *
 */
class Property {
    static mapping = {
         table 'PROPERTY'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         // In case a sequence is needed, changed the identity generator for the following code:
//       id generator:'sequence', column:'KEY', params:[sequence:'PROPERTY_sequence']
         id generator:'identity', column:'KEY'
		 sort key:'ASC'
    }
    String key
    String value
    String description
    Date lastUpdated

    static constraints = {
        key(size: 1..100, blank: false)
        value(size: 1..100, blank: false)
        description(size: 1..100, blank: false)
        lastUpdated(nullable: true)
    }
    String toString() {
        return "${key}" 
    }
}
